import { WorkOrderRefundPage } from "@/api/workorder";

export const tableConfig = {
  hasPage: true,
  isLoading: true,
  request: params => {
    return WorkOrderRefundPage(params);
  },
  dataParse: res => {
    const resData = res.data.data;
    const data = {
      list: resData.rows,
      total: resData.total
    };
    return data;
  },
  columns: [
    {
      prop: "check",
      isCustomColumn: true,
    },
    {
      prop: "whetherRefundName",
      label: "退款状态",
      isSlot: true,
      fixed: "left"
    },
    {
      prop: "refundGradeName",
      label: "退款等级",
      isSlot: true,
      width: "100px",
      fixed: "left"
    },
    {
      prop: "refundDetails",
      label: "多次退款详情",
      isSlot: true,
      width: "140px"
    },
    {
      prop: "xmbzNo",
      label: "后台单号"
    },
    {
      prop: "platformNo",
      label: "平台单号"
    },
    {
      prop: "channelName",
      label: "渠道"
    },
    {
      prop: "goodsName",
      label: "退款商品",
      isSlot: true,
      width: "160px"
    },
    {
      prop: "totalPrice",
      label: "合计金额",
      isSlot: true,
    },
    {
      prop: "refundMoney",
      label: "退款金额",
      class: 'c-red fw-bold fz-16',
    },
    {
      prop: "cakeCompensatePrice",
      label: "免半/免单金额",
      class: 'c-red fw-bold fz-16',
    },
    {
      prop: "sincerityGold",
      label: "诚意金",
      class: 'c-red fw-bold fz-16',
    },
    {
      prop: "refundCode",
      label: "退款二维码",
      width: "220px",
      isSlot: true
    },
    {
      prop: "applyReason",
      label: "申请原因",
      class: 'c-red fw-bold fz-16',
    },
    {
      prop: "refundReasonName",
      label: "退款原因"
    },
    {
      prop: "refundTypeName",
      label: "退款类型"
    },
    {
      prop: "payType",
      label: "支付渠道"
    },
    {
      prop: "payTransaction",
      label: "支付流水号"
    },
    {
      prop: "refundApplyPeople",
      label: "申请人"
    },
    {
      prop: "store",
      label: "平台+门店"
    },
    {
      prop: "createTime",
      label: "创建工单时间",
      width: "160px"
    },
    {
      prop: "refundTime",
      label: "结案时间",
      width: "160px"
    },
    {
      prop: "operate",
      label: "操作",
      width: "140px",
      isSlot: true,
      fixed: "right"
    }
  ]
};
